
import java.util.ArrayList;
import java.util.List;

public class ArticlesReader implements SearchAbility{
	
	//初始化
	public void init(){
		//new ScanFile();
		//new AuthorFinder();
	}

	//功能f1
	public List<String> f1(int param,String s){
		if(param==1&&s!=null){
			//按照文章标题搜索
		   List<String> array=new HalfSearch().find(" "+s);
		   return array;
		   //...array将返回到界面显示
		}else if(param==2&&s!=null){
			//按照作者搜索
			return new AuthorFinder().finda(s);
			//...re将返回到界面显示
		}else{
			return null;
		}
	}

	//功能f5
	public List<String> f5(List<String> s){
        return new MatcherHelper().matcherHelper(s); 
	}

	public static void main(String[] args) throws Exception {
		System.setProperty("entityExpansionLimit", "10000000");
		
		//ArticlesReader my_init = new ArticlesReader();
		//my_init.init();
		//ArticlesReader my_f1 = new ArticlesReader();
		//System.out.println(my_f1.f1(2,"Pin-Xing Lin"));
		//my_init.f5([deep]);
		//List<String> s=new ArrayList();
		//s.add("Education");
		//System.out.println(my_init.f5(s));
		
	}
}